<template>
    <div>
        <h1> 测试第三方登录 -----微信 / QQ / 支付宝</h1>
        <div class="auth_login_btn" @click="executeAuthLogin">进行授权登录</div>
        <div class="auth_login_btn" @click="executeAuthLoginMany">进行多次授权登录</div>
    </div>
</template>

<script>
    import XThirdLogin from "../x/XThirdLogin";

    export default {
        name: "testThirdLogin",
        mounted() {
            if(this.currentThird){
                alert('已经授权，第三方信息:'+JSON.stringify(this.currentThird))
            }
        },
        computed: {
            currentThird(){
                return this.$store.getters.currentThirdFn
            },
        },
        methods: {
            executeAuthLogin() {
                XThirdLogin.toLogin();
            },
            executeAuthLoginMany() {
                XThirdLogin.toLoginByWechat();
            }
        }
    }
</script>

<style scoped>
    .auth_login_btn {
        width: 200px;
        height: 50px;
        line-height: 50px;
        background-color: #0D75AD;
        margin: 150px auto;
        border-radius: 5px;
        color: white;
        font-size: 22px;
        font-weight: bolder;
        text-align: center;
    }
</style>